package com.leoman.plz_p.module.bean;

import java.io.Serializable;
import java.util.List;

import cn.com.corelib.subscribe.ResponseHandler;

/**
 * Created by guoh on 2018/7/15.
 */
public class BaseDataWithList<T> implements Serializable,ResponseHandler.IBaseData{

    /**
     * 状态码
     */
    public int status;
    /**
     * 消息
     */
    public String message;
    /**
     * 0成功 1错误
     */
    public int code;
    /**
     * 数据
     */
    public List<T> data;

    @Override
    public boolean isSuccess() {
        return code==0;
    }

    @Override
    public int status() {
        return status;
    }

    @Override
    public Object data() {
        return data;
    }

    @Override
    public String msg() {
        return message;
    }
}
